open FILE, "<$ARGV[0]";
open OUTFILE, ">$ARGV[1]";
@data_set = ();
while (<FILE>)
{
	chomp;
	s/^(.*)\:\s+\[//;
	@data = ($1);
	@raw_attrib = split/\]+\s+\[|\]/;
	$attrib_count = 0;
	foreach $ele (@raw_attrib) {
		@interval = split/,\s+/, $ele;
		push @data, $interval[0];
		push @data, $interval[1];
		$attrib_count++;
	};
	push @data_set, [@data];
};
print OUTFILE "$#data_set $attrib_count\n";
for ($i = 0; $i <= $#data_set; ++$i) {
	print OUTFILE "@{$data_set[$i]}\n";
};

